(function (a) {
	a.fn.readmore = function (c) {
		var d = a.extend({},
		a.fn.readmore.defaults, c);
		this.each(function () {
			a(this).data("opts", d);
			if (a(this).html().length > d.substr_len) {
				e(a(this));
				b(a(this))
			}
		});
		function b(g) {
			g.append(g.data("opts").more_link);
			var f = g.children(".more");
			f.click(function () {
				if (broswerFlag == "IE6" || broswerFlag == "IE7") {
					if (a(this).attr("href") == "") {
						a(this).hide();
						a(this).siblings("span:not(.hidden)").hide().siblings("span.hidden").animate({
							opacity: "toggle"
						},
						1000)
					}
				} else {
					if (a(this).attr("href") == null) {
						a(this).hide();
						a(this).siblings("span:not(.hidden)").hide().siblings("span.hidden").animate({
							opacity: "toggle"
						},
						1000)
					}
				}
			})
		}
		function e(j) {
			var i = j.data("opts");
			var g = j.html();
			var f = i.substr_len;
			var l = "<span>" + i.ellipses + "</span>";
			var h = g.substring(0, f) + l;
			var k = '<span class="hidden" style="display:none;">' + g.substring(f, g.length) + "</span>";
			j.html(h + k)
		}
		return this
	};
	a.fn.readmore.defaults = {
		substr_len: 500,
		ellipses: "&#8230;",
		more_link: ""
	}
})(jQuery);